import request from '@/utils/request'

// 查询资产变更列表
export function listH(query) {
  return request({
    url: '/eam/eamChange/list',
    method: 'get',
    params: query
  })
}

// 查询资产变更详细
export function getH(alterationId) {
  return request({
    url: '/eam/eamChange/' + alterationId,
    method: 'get'
  })
}

// 新增资产变更
export function addH(data) {
  return request({
    url: '/eam/eamChange/addH',
    method: 'post',
    data: data
  })
}
// 新增资产变更从
export function addD(data) {
  return request({
    url: '/eam/eamChange/addD',
    method: 'post',
    data: data
  })
}

// 修改资产变更
export function updateH(data) {
  return request({
    url: '/eam/eamChange/edit',
    method: 'put',
    data: data
  })
}

// 撤销变更单
export function retrunChgStatus(data) {
  return request({
    url: '/eam/eamChange/retrunChgStatus',
    method: 'put',
    data: data
  })
}

// 删除资产变更
export function delH(alterationId) {
  return request({
    url: '/eam/eamChange/delChgH/' + alterationId,
    method: 'delete'
  })
}

// 删除资产变更
export function updateD(data) {
  return request({
    url: '/eam/eamChange/updateChgD',
    method: 'post',
    data:data
  })
}

// 查询资产类别列表
export const getTypeList = (query) => {
  return request({
    url: '/eam/eamChange/typeList/',
    method: 'get',
    params:query
  })
}

// 查询资产类别列表
export const getusuPersonList = (query) => {
  return request({
    url: '/eam/eamChange/userListByDeptId/',
    method: 'get',
    params:query
  })
}

// 查询资产列表
export const getEamList = (query) => {
  return request({
    url: '/eam/asset/list/',
    method: 'get',
    params:query
  })
}

